﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

namespace UnitTesting.Fixturing
{
	[Obsolete]
	class CompositeValueProvider : StaticCompositeValueProvider, IEnumerable<IValueProvider>
	{
		internal CompositeValueProvider(params IValueProvider[] valueProviders) : this(new List<IValueProvider>(valueProviders))
		{
		}

		CompositeValueProvider(List<IValueProvider> valueProviders) : base(valueProviders)
		{
		}

		public IEnumerator<IValueProvider> GetEnumerator()
		{
			return ValueProviders.GetEnumerator();
		}

		IEnumerator IEnumerable.GetEnumerator()
		{
			return GetEnumerator();
		}

		public override ICompositeValueProvider Clone()
		{
			return new CompositeValueProvider(ValueProviders.ToArray());
		}
	}
}